<?php
//Nguyen Van Binh
//suongmumc@gmail.com

defined( '_VALID_NVB' ) or die( 'Direct Access to this location is not allowed.' );

function get_url_product($idc){
	global $DB;
	$idc=intval($idc);
	$sql="SELECT * FROM catpd WHERE id_catpd=$idc";
	$db=$DB->query($sql);
	if($rs=mysql_fetch_array($db))	{
		return $rs['url'];	
	}
}


function get_url_news($idc){
	global $DB;
	$idc=intval($idc);
	$sql="SELECT * FROM cat WHERE id_cat=$idc";
	$db=$DB->query($sql);
	if($rs=mysql_fetch_array($db))	{
		return $rs['url'];	
	}
}
function get_url_info($idc){
	global $DB;
	$idc=intval($idc);
	$sql="SELECT * FROM catif WHERE id_catif=$idc";
	$db=$DB->query($sql);
	if($rs=mysql_fetch_array($db))	{
		return $rs['url'];	
	}
}

?>